package com.easylinkin.linkappapi.ruleengine.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.easylinkin.linkappapi.alarm.entity.AlarmPersonContact;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 执行器关联告警通知人
 * </p>
 *
 * @author TongJie
 * @since 2020-08-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("rule_execution_ref_alarm_person_contact")
public class RuleExecutionRefAlarmPersonContact extends Model<RuleExecutionRefAlarmPersonContact> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("id")
    private String id;

    /**
     * 执行器 id
     */
    @TableField("rule_execution_id")
    private String ruleExecutionId;

    /**
     * 告警通知人 id
     */
    @TableField("alarm_person_contact_id")
    private String alarmPersonContactId;

    /**
     * 告警通知人 类型 0、null是以前的逻辑
     */
    @TableField("person_type")
    private String personType;

    /**
     * 告警联系人
     */
    @TableField(exist = false)
    private AlarmPersonContact alarmPersonContact;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
